var tag=document.getElementsByTagName('li');
var box=document.getElementsByTagName('div');
for(var i=0;i<tag.length;i++){
    tag[i].index=i;
    tag[i].onclick=function(){
        for(var j=0;j<tag.length;j++){
            tag[j].style.background= "none";
            box[j].style.display='none'
        }
        this.style.background="#00000050";
        var n=this.index;
        box[n].style.display='block'
    }
}